import {api} from '@/api/api'

export default {
  getFileUploadData(cb){
    //v1.L1.文件S3前端上传参数.ok
    //https://apib.hd.xxx.com/v1/file/params
    return api.post('/file/params', {}, cb)
  },
  getPageDatas(params, cb){
    return api.post('/site/get', params, cb)
  },
  
  cropImg(params, cb){
    //https://apib.hd.xxx.com/v1/file/imgx
    return api.post('/file/imgx', params, cb)
  },
  generateQrcode(params, cb){
    //https://apib.hd.xxx.com/v1/site/qrcode
    return api.post('/site/qrcode', params, cb)
  },
  createSite(params, cb){
    //https://apib.hd.xxx.com/v1/site/add
    return api.post('/site/add', params, cb)
  },
  savePageDatas(params, cb){
    return api.post('/site/save', {params: JSON.stringify(params)}, cb)
  },
}
